package com.wicket.okrcomponent.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.wicket.okrcomponent.biz.service.BusinessAtomService;
import com.wicket.okrcomponent.biz.service.dto.req.*;
import com.wicket.okrcomponent.biz.service.dto.res.*;
import com.wicket.okrcomponent.common.ro.OkrResult;
import com.wicket.okrcomponent.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/comp/businessAtom/")
public class BusinessAtomController {

  @Autowired
  BusinessAtomService businessAtomService;
/**
   * D2-新增redis业务数据对象（业务原子）
   */
    @PostMapping("addRedisBusinessDataSetCom")
    public OkrResult<AddRedisBusinessDataSetComRespDto> addRedisBusinessDataSetCom(@RequestBody @Validated AddRedisBusinessDataSetComReqDto reqDTO){
    return OkrResult.success(businessAtomService.addRedisBusinessDataSetCom(reqDTO));
    }
/**
   * D2-查询redis业务数据对象详情（业务原子）
   */
    @PostMapping("queryRedisBusinessDataSetDetailCom")
    public OkrResult<QueryRedisBusinessDataSetDetailComRespDto> queryRedisBusinessDataSetDetailCom(@RequestBody @Validated QueryRedisBusinessDataSetDetailComReqDto reqDTO){
    return OkrResult.success(businessAtomService.queryRedisBusinessDataSetDetailCom(reqDTO));
    }
/**
   * D2-查询redis业务数据对象列表（业务原子）
   */
    @PostMapping("queryRedisBusinessDataSetListCom")
    public OkrResult<QueryRedisBusinessDataSetListComRespDto> queryRedisBusinessDataSetListCom(@RequestBody @Validated QueryRedisBusinessDataSetListComReqDto reqDTO){
    return OkrResult.success(businessAtomService.queryRedisBusinessDataSetListCom(reqDTO));
    }
/**
   * D2-查询入参redis业务数据对象列表（业务原子）
   */
    @PostMapping("queryRefRedisBusinessDataSetListCom")
    public OkrResult<QueryRefRedisBusinessDataSetListComRespDto> queryRefRedisBusinessDataSetListCom(@RequestBody @Validated QueryRefRedisBusinessDataSetListComReqDto reqDTO){
    return OkrResult.success(businessAtomService.queryRefRedisBusinessDataSetListCom(reqDTO));
    }
/**
   * D2-查询入参redis业务数据对象详情（业务原子）
   */
    @PostMapping("queryRefRedisBusinessDataSetDetailCom")
    public OkrResult<QueryRefRedisBusinessDataSetDetailComRespDto> queryRefRedisBusinessDataSetDetailCom(@RequestBody @Validated QueryRefRedisBusinessDataSetDetailComReqDto reqDTO){
    return OkrResult.success(businessAtomService.queryRefRedisBusinessDataSetDetailCom(reqDTO));
    }
/**
   * D2新增内存业务数据(业务原子)
   */
    @PostMapping("addMemoryBusinessSetDataCom")
    public OkrResult<AddMemoryBusinessSetDataComRespDto> addMemoryBusinessSetDataCom(@RequestBody @Validated AddMemoryBusinessSetDataComReqDto reqDTO){
    return OkrResult.success(businessAtomService.addMemoryBusinessSetDataCom(reqDTO));
    }
///**
//   * D2查询内存业务数据详情(业务原子)
//   */
//    @PostMapping("queryMemoryBusinessDataSetDetailCom")
//    public OkrResult<QueryMemoryBusinessDataSetDetailComRespDto> queryMemoryBusinessDataSetDetailCom(@RequestBody @Validated QueryMemoryBusinessDataSetDetailComReqDto reqDTO){
//    return OkrResult.success(businessAtomService.queryMemoryBusinessDataSetDetailCom(reqDTO));
//    }
/**
   * D2新增redis业务数据对象验证数据(公共)
   */
    @PostMapping("addRedisBusinessDataSetCorrectDataCom")
    public OkrResult<AddRedisBusinessDataSetCorrectDataComRespDto> addRedisBusinessDataSetCorrectDataCom(@RequestBody @Validated AddRedisBusinessDataSetCorrectDataComReqDto reqDTO){
    return OkrResult.success(businessAtomService.addRedisBusinessDataSetCorrectDataCom(reqDTO));
    }
/**
   * D2修改redis业务数据对象(业务原子)
   */
    @PostMapping("updateRedisBusinessDataSetCom")
    public OkrResult<UpdateRedisBusinessDataSetComRespDto> updateRedisBusinessDataSetCom(@RequestBody @Validated UpdateRedisBusinessDataSetComReqDto reqDTO){
    return OkrResult.success(businessAtomService.updateRedisBusinessDataSetCom(reqDTO));
    }
/**
   * D2执行DEBUG业务对象数据Redis(公共)
   */
    @PostMapping("implementDebugBusinessDataRedisCom")
    public OkrResult<ImplementDebugBusinessDataRedisComRespDto> implementDebugBusinessDataRedisCom(@RequestBody @Validated ImplementDebugBusinessDataRedisComReqDto reqDTO){
    return OkrResult.success(businessAtomService.implementDebugBusinessDataRedisCom(reqDTO));
    }
/**
   * D2动态分配数据集最后一条记录值(公共)
   */
    @PostMapping("analysisDyncAllocateDatasetLastRecordCom")
    public OkrResult<AnalysisDyncAllocateDatasetLastRecordComRespDto> analysisDyncAllocateDatasetLastRecordCom(@RequestBody @Validated AnalysisDyncAllocateDatasetLastRecordComReqDto reqDTO){
    return OkrResult.success(businessAtomService.analysisDyncAllocateDatasetLastRecordCom(reqDTO));
    }
/**
   * D2删除redis业务数据对象(业务原子)
   */
    @PostMapping("deleteRedisBusinessDataSetCom")
    public OkrResult<DeleteRedisBusinessDataSetComRespDto> deleteRedisBusinessDataSetCom(@RequestBody @Validated DeleteRedisBusinessDataSetComReqDto reqDTO){
    return OkrResult.success(businessAtomService.deleteRedisBusinessDataSetCom(reqDTO));
    }
/**
   * D2新增内存业务数据(业务原子)
   */
    @PostMapping("addMemoryBusiness2DataCom")
    public OkrResult<AddMemoryBusiness2DataComRespDto> addMemoryBusiness2DataCom(@RequestBody @Validated AddMemoryBusiness2DataComReqDto reqDTO){
    return OkrResult.success(businessAtomService.addMemoryBusiness2DataCom(reqDTO));
    }
/**
   * D2新增MQ队列数据(业务原子)
   */
    @PostMapping("addMessageQueueDataBusCom")
    public OkrResult<AddMessageQueueDataBusComRespDto> addMessageQueueDataBusCom(@RequestBody @Validated AddMessageQueueDataBusComReqDto reqDTO){
    return OkrResult.success(businessAtomService.addMessageQueueDataBusCom(reqDTO));
    }
/**
   * D2查询MQ队列数据列表(业务原子)
   */
    @PostMapping("queryMessageQueueDataListCom")
    public OkrResult<QueryMessageQueueDataListComRespDto> queryMessageQueueDataListCom(@RequestBody @Validated QueryMessageQueueDataListComReqDto reqDTO){
    return OkrResult.success(businessAtomService.queryMessageQueueDataListCom(reqDTO));
    }
}
